package com.hazardousholdings.unkj.validation;

public interface Validator<T> {

	/**
	 * Validates the input.
	 * 
	 * @param input the input to be validated
	 * 
	 * @return the results of the validation
	 */
	public ValidationResults<T> validate(T input);
	
	/**
	 * Gets the message given when input is invalid.
	 * If no message was set, a default will be used.
	 * 
	 * @return the invalid message
	 */
	public String getInvalidMessage();
	
	/**
	 * Sets the message given when input is invalid. 
	 * If this is not set, a default will be used.
	 * Passing null will reset the message to the default.
	 * 
	 * @param message the new invalid message
	 */
	public void setInvalidMessage(String message);
}
